<!DOCTYPE html>
{% load static %}
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>螃蟹文章添加</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta id="viewport" name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,minimal-ui">
    <link rel="stylesheet" type="text/css" href="{% static 'css/md/common.css' %}">
    <style>
        .error_msg {
            color: red;
            font-size: 15px;
        }
    </style>
</head>
<body style="">
<header class="title" style="color: red">
    我的螃蟹
</header>
<section class="box-group">
    <form class="submit_form" action="{% url 'crab_love_add' username=request.chart_web.user.username %}" method="post"
          novalidate>
        {% csrf_token %}
        <section class="item-group">
            <label style="color: #03a2ec">
                文章标题
            </label>
            <input type="text" name="name" id="id_name" placeholder="给你的螃蟹起一个名字" style="color: #07f65f">
        </section>
        <div>
            <span class="error_msg">{{ form.name.errors.0 }}</span>
        </div>
        <section class="item-group">
            <label style="color: red">
                你期望收到者的姓名，可以为空(●'◡'●)
            </label>
            <input type="text" name="to_one" id="id_to_one" placeholder="" style="color: #18e508">
        </section>
        <div><span class="error_msg">{{ form.to_one.errors.0 }}</span></div>
        <section class="item-group item-group-desc">
            <label style="color: red">
                你想说的话
            </label>
            <section class="desc-group">
                <textarea name="content" id="id_content" placeholder="这里输入你想说的话"></textarea>
                <div><span class="error_msg">{{ form.content.errors.0 }}</span></div>
                <button class="submit_btn">寄出</button>
            </section>
        </section>
    </form>
</section>
<script src="{% static 'js/md/jquery.min.js.下载' %}"></script>
<script src="{% static 'js/md/upload.js.下载' %}"></script>
<script type="text/javascript">
    new img_compress_upload({
        max_height: 1024,
        max_width: 1024,
        max_num: 100,
        list_box: $('.img_box'),
        add_btn: $('.img_box .add_btn'),
        del_btn_class: 'del',
    });
</script>
</body>
</html>